home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1989 February
/
Ahoy_Magazine_89-02_1989_Double_L.d64
/
Time Angle
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
495b
|
15 lines
0 print"[147]"tab(14)"time angle"
1 rem ==================================
2 rem commodares problem #58-2 :
3 rem time angle
4 rem solution by
5 rem jim borden
6 rem ==================================
10 poke 208,1: poke 842,34: input "hh:mm:ss";t$: if len(t$)<>8 goto 10
20 rem 198 & 631 for c-64 users
30 h=val(left$(t$,2)): m=val(mid$(t$,4,2)): s=val(right$(t$,2))
40 if h>11 then h=h-12: if h>11 then h=h-12
50 m=m*6+s*.1: h=(h+m/360)*30: a=abs(h-m): if a>180 then a=360-a
60 print "angle ="; a; "degrees"
70 goto 10